home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_ambpr.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  58 lines

  1. # Jones 3D Cog Script
  2. #
  3. # shs_AmbPR.cog
  4. #
  5. # Plays a random sound at random intervals with random volume and panning
  6. #
  7. #
  8. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13.        message        crossed
  14.   
  15.     surface     start_Amb1      linkID=1
  16.     surface     stop_Amb1       linkID=0
  17.     
  18.     thing        soundPos0        nolink
  19.     thing        player            local
  20.  
  21.     sound        ambient0=shs_h2odrain_c.wav   local
  22.         
  23.     int         looping     local
  24.     
  25.  
  26. end
  27.  
  28. # ========================================================================================
  29.  
  30.  
  31. code
  32.  
  33. # ........................................................................................
  34.  
  35. startup:
  36.     player = GetLocalPlayerThing();
  37.     return;
  38.  
  39. # ........................................................................................
  40.     
  41. crossed:
  42.     
  43.     if(GetSenderID() == 1)
  44.     {
  45.         looping=PlaySoundThing(ambient0, soundPos0, .5, 2, 25, 0x045);
  46.     }
  47.         
  48.     if(GetSenderID() == 0)
  49.     {
  50.         StopSound(looping, 1.0);
  51.     }
  52.       return;
  53.  
  54.  
  55. end
  56.     
  57.     
  58.